package com.biz.primus.model.promotion.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * JqGrid表格数据Vo
 *
 * @author david-liu
 */
@Getter
@Setter
@ApiModel(value = "JqGrid表格数据Vo")
public class JqGridTableViewVo<T extends Serializable> implements Serializable {
    private static final long serialVersionUID = 966805211130965770L;

    @ApiModelProperty(value = "总共多少页")
    private int total;

    @ApiModelProperty(value = "当前第几页")
    private int page;

    @ApiModelProperty(value = "总共多少条")
    private int records;

    @ApiModelProperty(value = "行数据")
    private List<T> rows;

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
